
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>6.3 使用 FlutterSDK 3.22.1 · Flutter for Harmony教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="5.4第一个鸿蒙Flutter应用程序.html" />
    
    
    <link rel="prev" href="5.2mac环境配置.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.gitbook.com/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.npmjs.com/package/package" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">元服务开发实践</a>
      </li><li>
        <a href="https://blog.51cto.com/jianguo" target="_blank">OpenHarmony应用开发</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    1.前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../坚果派介绍.html">
            
                <a href="../坚果派介绍.html">
            
                    
                    2.坚果派介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    3.Flutter与Dart介绍
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter3/3.1Flutter介绍.html">
            
                <a href="../chapter3/3.1Flutter介绍.html">
            
                    
                    3.1Flutter介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter3/3.2Dart介绍.html">
            
                <a href="../chapter3/3.2Dart介绍.html">
            
                    
                    3.2Dart介绍
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    4.HarmonyOS/OpenHarmony与ArkTS介绍
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter4/4.1HarmonyOS">
            
                <span>
            
                    
                    4.1HarmonyOS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../chapter4/4.2OpenHarmony.html">
            
                <a href="../chapter4/4.2OpenHarmony.html">
            
                    
                    4.2OpenHarmony
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../chapter4/4.3HarmonyOSNEXT.html">
            
                <a href="../chapter4/4.3HarmonyOSNEXT.html">
            
                    
                    4.3HarmonyOS NEXT
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../chapter4/4.4ArkTS语言 .html">
            
                <a href="../chapter4/4.4ArkTS语言 .html">
            
                    
                    4.4ArkTS语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../chapter4/4.5三者的差异 .md">
            
                <span>
            
                    
                    4.5三者的区别与联系
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    5.Flutter鸿蒙化
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" >
            
                <span>
            
                    
                    [5.1背景]
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" >
            
                <span>
            
                    
                    [5.2原理]
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../chapter2/2.3Impeller渲染引擎.html">
            
                <a href="../chapter2/2.3Impeller渲染引擎.html">
            
                    
                    5.3Impeller渲染引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    6.鸿蒙Flutter开发环境配置（windows与mac）
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="5.1windows环境配置.html">
            
                <a href="5.1windows环境配置.html">
            
                    
                    6.1windows环境配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="5.2mac环境配置.html">
            
                <a href="5.2mac环境配置.html">
            
                    
                    6.2 mac环境配置
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.6.3" data-path="5.6使用最新的fluttersdk配置开发环境.html">
            
                <a href="5.6使用最新的fluttersdk配置开发环境.html">
            
                    
                    6.3 使用 FlutterSDK 3.22.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="5.4第一个鸿蒙Flutter应用程序.html">
            
                <a href="5.4第一个鸿蒙Flutter应用程序.html">
            
                    
                    6.4第一个鸿蒙Flutter应用程序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="5.5鸿蒙Flutter运行到HarmonyOS.md">
            
                <span>
            
                    
                    6.5运行到多平台
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="5.7OpenHarmony设备运行指导.html">
            
                <a href="5.7OpenHarmony设备运行指导.html">
            
                    
                    6.6OpenHarmony设备运行指导
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="5.8现有项目支持鸿蒙.html">
            
                <a href="5.8现有项目支持鸿蒙.html">
            
                    
                    6.7现有Flutter项目支持鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="5.9鸿蒙版Flutter仓库变更.html">
            
                <a href="5.9鸿蒙版Flutter仓库变更.html">
            
                    
                    6.8鸿蒙版Flutter仓库变更
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="5.11使用fvm.html">
            
                <a href="5.11使用fvm.html">
            
                    
                    6.9使用FVM管理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    7.在鸿蒙应用中添加Flutter页面
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" >
            
                <span>
            
                    
                    7.1如何使用 FlutterPage
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" >
            
                <span>
            
                    
                    7.2如何使用混合开发添加跳转 FlutterEntry
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" >
            
                <span>
            
                    
                    7.3 harmonyos添加flutter页面跳转时路由的处理
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" >
            
                <span>
            
                    
                    8.在鸿蒙应用中使用Flutter Channel能力
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../chapter8/8.1如何使用Flutter与鸿蒙通信 FlutterChannel.html">
            
                <a href="../chapter8/8.1如何使用Flutter与鸿蒙通信 FlutterChannel.html">
            
                    
                    8.1如何使用Flutter与鸿蒙通信 FlutterChannel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../chapter8/8.4 混合渲染开发实践：以 fluttertpc_scan 三方库为例.html">
            
                <a href="../chapter8/8.4 混合渲染开发实践：以 fluttertpc_scan 三方库为例.html">
            
                    
                    8.4 混合渲染开发实践：以 fluttertpc_scan 三方库为例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" >
            
                <span>
            
                    
                    9.与原生混合渲染
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/Flutter OHOS外接纹理适配简介.md">
            
                    
                    9.1Flutter OHOS外接纹理适配简介.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/如何使用多引擎 FlutterEngineGroup.md">
            
                    
                    9.2如何使用多引擎 FlutterEngineGroup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/如何使用PlatformView.md">
            
                    
                    9.3如何使用PlatformView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/PlatformView同层渲染方案适配切换指导.md">
            
                    
                    9.4PlatformView同层渲染方案适配切换指导
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" >
            
                <span>
            
                    
                    9.5如何使用混合开发 module
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" >
            
                <span>
            
                    
                    10.开发Flutter静态库
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/如何使用混合开发 module.md">
            
                    
                    10.1开发module
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/开发package.md">
            
                    
                    10.2开发package
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/开发plugin.md">
            
                    
                    10.3开发plugin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/开发FFI plugin.md">
            
                    
                    10.4开发FFI plugin
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" >
            
                <span>
            
                    
                    11.Packages使用指南
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../chapter11/11.1高效使用 Packages指南.html">
            
                <a href="../chapter11/11.1高效使用 Packages指南.html">
            
                    
                    11.1高效使用 Packages指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" >
            
                <span>
            
                    
                    11.2发布Packages
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" >
            
                <span>
            
                    
                    12.鸿蒙适配Flutter三方库
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../chapter12/12.1纯dart库无需迁移.html">
            
                <a href="../chapter12/12.1纯dart库无需迁移.html">
            
                    
                    12.1纯dart库无需迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../chapter12/12.2坚果派已适配的库">
            
                <span>
            
                    
                    12.2坚果派目前适配三方库进展
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="../chapter12/12.3适配三方库之FlutterToast.html">
            
                <a href="../chapter12/12.3适配三方库之FlutterToast.html">
            
                    
                    12.3适配三方库之FlutterToast
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="../chapter12/12.4适配适配三方库之udid.md">
            
                <span>
            
                    
                    12.4适配三方库之udid
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.5" data-path="../chapter12/12.5适配torch_light.html">
            
                <a href="../chapter12/12.5适配torch_light.html">
            
                    
                    12.5适配torch_light.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.6" data-path="../chapter12/12.6适配flutter_native_contact_picker.html">
            
                <a href="../chapter12/12.6适配flutter_native_contact_picker.html">
            
                    
                    12.6适配flutter_native_contact_picker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.7" data-path="../chapter12/12.7适配flutter_timezone.html">
            
                <a href="../chapter12/12.7适配flutter_timezone.html">
            
                    
                    12.7适配flutter_timezone.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.8" data-path="../chapter12/12.8适配flutter_exit_app.html">
            
                <a href="../chapter12/12.8适配flutter_exit_app.html">
            
                    
                    12.8适配flutter_exit_app.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.9" data-path="../chapter12/12.9适配flutter_phone_direct_caller.html">
            
                <a href="../chapter12/12.9适配flutter_phone_direct_caller.html">
            
                    
                    12.9适配flutter_phone_direct_caller
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.10" data-path="../chapter12/12.10适配flutter_app_icon_badge.html">
            
                <a href="../chapter12/12.10适配flutter_app_icon_badge.html">
            
                    
                    12.10适配flutter_app_icon_badge
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.11" data-path="../chapter12/12.11适配memory_info.html">
            
                <a href="../chapter12/12.11适配memory_info.html">
            
                    
                    12.11适配memory_info
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" >
            
                <span>
            
                    
                    13.1DevTool使用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" >
            
                <span>
            
                    
                    13.1DevTool使用
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/05_performance/performance-delimitation.md">
            
                    
                    13.2性能分析定界(OpenHarmony平台)指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.3" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/05_performance/performance-threads-sequence.md">
            
                    
                    13.3性能分析第一步-梳理线程顺序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.4" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/05_performance/performance-frame-rendering-tracking.md">
            
                    
                    13.4性能分析-帧渲染跟踪
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.5" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/05_performance/performance-sliding-response-time.md">
            
                    
                    13.5性能分析-滑动响应时延
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.6" data-path="../chapter12/12.6如何调试代码">
            
                <span>
            
                    
                    13.6如何调试代码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" >
            
                <span>
            
                    
                    14.迁移实战
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" >
            
                <span>
            
                    
                    坚果驾考
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="../chapter14/14.2使用url_launcher.html">
            
                <a href="../chapter14/14.2使用url_launcher.html">
            
                    
                    14.2使用url_launcher
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.3" data-path="../chapter14/14.3flutter开发鸿蒙PC应用.html">
            
                <a href="../chapter14/14.3flutter开发鸿蒙PC应用.html">
            
                    
                    14.3flutter开发鸿蒙PC应用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" >
            
                <span>
            
                    
                    15.上架审核
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" >
            
                <span>
            
                    
                    16.FAQ
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.16.1" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/08_FAQ/environment.md">
            
                    
                    16.1环境相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.2" data-path="../chapter16/16.3权限相关.html">
            
                <a href="../chapter16/16.3权限相关.html">
            
                    
                    16.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.3" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/08_FAQ/ohos_engine.md">
            
                    
                    ohos引擎产物编译相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.4" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/08_FAQ/ohos_hap.md">
            
                    
                    ohos应用编译相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.5" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/08_FAQ/ohos_code.md">
            
                    
                    ohos代码开发相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.6" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/08_FAQ/ohos_run.md">
            
                    
                    ohos运行相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.7" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/README.md">
            
                    
                    功能开发相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.8" >
            
                <a target="_blank" href="https://gitee.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/08_FAQ/flutter_cppcrash_guideline.md">
            
                    
                    解析flutter相关的cppcrash堆栈
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.17" >
            
                <span>
            
                    
                    17.阅读更多
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" >
            
                <span>
            
                    
                    现有Flutter项目支持鸿蒙
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="../chapter17/17.2平台判断与问题处理指南.html">
            
                <a href="../chapter17/17.2平台判断与问题处理指南.html">
            
                    
                    17.2平台判断与问题处理指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.18" >
            
                <span>
            
                    
                    18.关于未来
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.18.1" >
            
                <span>
            
                    
                    致谢
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >6.3 使用 FlutterSDK 3.22.1</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="vip-container">
                    <h1 id="&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7684;-flutter-sdk-3221&#x6784;&#x5EFA;harmonyos&#x5E94;&#x7528;"><a name="&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7684;-flutter-sdk-3221&#x6784;&#x5EFA;harmonyos&#x5E94;&#x7528;" class="plugin-anchor" href="#&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7684;-flutter-sdk-3221&#x6784;&#x5EFA;harmonyos&#x5E94;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7684; Flutter SDK 3.22.1&#x6784;&#x5EFA;HarmonyOS&#x5E94;&#x7528;</h1>
<p>&#x5927;&#x5BB6;&#x90FD;&#x77E5;&#x9053;&#x76EE;&#x524D;&#x5F00;&#x6E90;&#x9E3F;&#x8499;&#x7684;tpc&#x548C;sig&#x4ED3;&#x90FD;&#x8FC1;&#x79FB;&#x5230;gitcode&#x5E73;&#x53F0;&#x4E86;&#xFF0C;&#x672C;&#x6B21;&#x66F4;&#x65B0;&#x5BF9; Flutter SDK &#x4E5F;&#x6709;&#x6240;&#x6D89;&#x53CA;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x5C31;&#x7528;&#x6700;&#x65B0;&#x7684;Flutter SDK &#x6765;&#x4E00;&#x8D77;&#x770B;&#x4E00;&#x4E0B;&#x5982;&#x4F55;&#x6784;&#x5EFA;HarmonyOS&#x5E94;&#x7528;</p>
<p>&#x6700;&#x65B0;&#x7684;&#x4ED3;&#x5E93;&#x662F;<a href="https://gitcode.com/openharmony-sig/flutter_flutter" target="_blank">https://gitcode.com/openharmony-sig/flutter_flutter</a></p>
<p>&#x8FD9;&#x4ED3;&#x5E93;&#x91CC;&#x9762;&#x6709;&#x4E24;&#x4E2A;&#x7248;&#x672C;&#xFF0C;&#x4E00;&#x4E2A;&#x662F;3.7&#x7248;&#x672C;&#xFF0C;&#x4E00;&#x4E2A;&#x662F;3.22&#x7248;&#x672C;</p>
<p>&#x6240;&#x4EE5;&#x5927;&#x5BB6;&#x9700;&#x8981;&#x54EA;&#x4E2A;&#x7248;&#x672C;&#xFF0C;&#x5C31;&#x6839;&#x636E;&#x81EA;&#x5DF1;&#x7684;&#x60C5;&#x51B5;&#x5C31;&#x597D;</p>
<p>&#x9996;&#x5148;</p>
<h2 id="&#x4E0B;&#x8F7D;flutterflutter"><a name="&#x4E0B;&#x8F7D;flutterflutter" class="plugin-anchor" href="#&#x4E0B;&#x8F7D;flutterflutter"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E0B;&#x8F7D;flutter_flutter</h2>
<pre><code> git clone git@gitcode.com:openharmony-sig/flutter_flutter.git
</code></pre><p>&#x6216;&#x8005;</p>
<pre><code>git clone https://gitcode.com/openharmony-sig/flutter_flutter.git
</code></pre><h2 id="&#x5207;&#x6362;&#x5206;&#x652F;3220-ohos"><a name="&#x5207;&#x6362;&#x5206;&#x652F;3220-ohos" class="plugin-anchor" href="#&#x5207;&#x6362;&#x5206;&#x652F;3220-ohos"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5207;&#x6362;&#x5206;&#x652F;3.22.0-ohos</h2>
<p>&#x7136;&#x540E;&#x5207;&#x6362;&#x5206;&#x652F;</p>
<pre><code>git checkout -b 3.22.0-ohos origin/3.22.0-ohos
</code></pre><h2 id="&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;"><a name="&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;" class="plugin-anchor" href="#&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;</h2>
<p>&#x7136;&#x540E;&#x6253;&#x5F00;~/.bash_profile&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x66F4;&#x6539;&#x76EE;&#x5F55;&#x3002;</p>
<pre><code>open ~/.bash_profile
</code></pre><pre><code>export PATH=/Users/jianguo/huawei/flutter/bin:$PATH
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export FLUTTER_GIT_URL=https://gitcode.com/openharmony-sig/flutter_flutter.git
</code></pre><p>&#x5237;&#x65B0;</p>
<pre><code>source ~/.bash_profile
</code></pre><p>&#x7136;&#x540E;&#x6211;&#x4EEC;&#x518D;&#x53BB;&#x68C0;&#x67E5;&#x73AF;&#x5883;</p>
<pre><code>jianguo@nutpi ~ % flutter --version
Flutter 3.22.1-ohos-0.1.1 &#x2022; channel [user-branch] &#x2022; git@gitcode.com:openharmony-sig/flutter_flutter.git
Framework &#x2022; revision ff3e031966 (3 days ago) &#x2022; 2025-04-07 10:25:16 +0800
Engine &#x2022; revision f6344b75dc
Tools &#x2022; Dart 3.4.0 &#x2022; DevTools 2.34.1
jianguo@nutpi ~ %
</code></pre><p>&#x73B0;&#x5728;&#x6211;&#x4EEC;&#x5C31;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x662F;3.22&#x5566;</p>
<h2 id="&#x9879;&#x76EE;&#x914D;&#x7F6E;"><a name="&#x9879;&#x76EE;&#x914D;&#x7F6E;" class="plugin-anchor" href="#&#x9879;&#x76EE;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9879;&#x76EE;&#x914D;&#x7F6E;</h2>
<p>1.&#x8FDB;&#x5165;&#x9879;&#x76EE;&#x6839;&#x76EE;&#x5F55;&#xFF0C;&#x5982;&#x679C;&#x9879;&#x76EE;&#x8FD8;&#x672A;&#x521B;&#x5EFA;&#xFF0C;&#x5219;&#x4F7F;&#x7528; <code>flutter create</code> &#x547D;&#x4EE4;&#x521B;&#x5EFA;&#x9879;&#x76EE;</p>
<pre><code>flutter create my_app
</code></pre><pre><code>assets            chapter11        chapter15        chapter5        chapter9        styles
jianguo@jianguodeMacBook-Pro-2 gitbook_flutter % flutter create my_app
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Downloading Material fonts...                                    1,271ms
Downloading Gradle Wrapper...                                       28ms
Downloading package sky_engine...                                  635ms
Downloading flutter_patched_sdk tools...                           301ms
Downloading flutter_patched_sdk_product tools...                   152ms
Downloading darwin-arm64 tools...                                  909ms
Downloading libimobiledevice...                                     28ms
Downloading usbmuxd...                                              26ms
Downloading libplist...                                             27ms
Downloading openssl...                                              84ms
Downloading ios-deploy...                                           31ms
Downloading darwin-arm64/font-subset tools...                      115ms
Developer identity &quot;Apple Development: Shu Shu (669W3557MK)&quot; selected for iOS code signing
Creating project my_app...
Resolving dependencies in `my_app`... 
Downloading packages... 
Got dependencies in `my_app`.
Wrote 161 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev

In order to run your application, type:

  $ cd my_app
  $ flutter run

Your application code is in my_app/lib/main.dart.
</code></pre><p>2.&#x5982;&#x679C;&#x9879;&#x76EE;&#x5DF2;&#x7ECF;&#x521B;&#x5EFA;&#xFF0C;&#x8FD8;&#x672A;&#x6DFB;&#x52A0;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x652F;&#x6301;&#xFF0C;&#x5219;&#x4F7F;&#x7528;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x6DFB;&#x52A0;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x652F;&#x6301;&#x3002;&#x6709;&#x7684;&#x8BDD;&#xFF0C;&#x5C31;&#x4E0D;&#x7528;&#x6267;&#x884C;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x3002;</p>
<pre><code>flutter create --platforms ohos .
</code></pre><p>&#x5176;&#x4E2D;&#xFF0C;<code>.</code>&#x4EE3;&#x8868;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x3002;</p>
<p>&#x76EE;&#x5F55;&#x7ED3;&#x6784;&#x7C7B;&#x4F3C;&#x5982;&#x4E0B;&#x6240;&#x793A;</p>
<pre><code>jianguo@nutpi my_app %  tree -L 3
.
&#x251C;&#x2500;&#x2500; README.md
&#x251C;&#x2500;&#x2500; analysis_options.yaml
&#x251C;&#x2500;&#x2500; android
&#x2502;   &#x251C;&#x2500;&#x2500; app
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; build.gradle
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; src
&#x2502;   &#x251C;&#x2500;&#x2500; build.gradle
&#x2502;   &#x251C;&#x2500;&#x2500; gradle
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; wrapper
&#x2502;   &#x251C;&#x2500;&#x2500; gradle.properties
&#x2502;   &#x251C;&#x2500;&#x2500; gradlew
&#x2502;   &#x251C;&#x2500;&#x2500; gradlew.bat
&#x2502;   &#x251C;&#x2500;&#x2500; local.properties
&#x2502;   &#x251C;&#x2500;&#x2500; my_app_android.iml
&#x2502;   &#x2514;&#x2500;&#x2500; settings.gradle
&#x251C;&#x2500;&#x2500; ios
&#x2502;   &#x251C;&#x2500;&#x2500; Flutter
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; AppFrameworkInfo.plist
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Debug.xcconfig
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Generated.xcconfig
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Release.xcconfig
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; flutter_export_environment.sh
&#x2502;   &#x251C;&#x2500;&#x2500; Runner
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; AppDelegate.swift
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Assets.xcassets
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Base.lproj
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; GeneratedPluginRegistrant.h
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; GeneratedPluginRegistrant.m
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Info.plist
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; Runner-Bridging-Header.h
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcodeproj
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; project.pbxproj
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; project.xcworkspace
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; xcshareddata
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcworkspace
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; contents.xcworkspacedata
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; xcshareddata
&#x2502;   &#x2514;&#x2500;&#x2500; RunnerTests
&#x2502;       &#x2514;&#x2500;&#x2500; RunnerTests.swift
&#x251C;&#x2500;&#x2500; lib
&#x2502;   &#x2514;&#x2500;&#x2500; main.dart
&#x251C;&#x2500;&#x2500; linux
&#x2502;   &#x251C;&#x2500;&#x2500; CMakeLists.txt
&#x2502;   &#x251C;&#x2500;&#x2500; flutter
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; CMakeLists.txt
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; generated_plugin_registrant.cc
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; generated_plugin_registrant.h
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; generated_plugins.cmake
&#x2502;   &#x251C;&#x2500;&#x2500; main.cc
&#x2502;   &#x251C;&#x2500;&#x2500; my_application.cc
&#x2502;   &#x2514;&#x2500;&#x2500; my_application.h
&#x251C;&#x2500;&#x2500; macos
&#x2502;   &#x251C;&#x2500;&#x2500; Flutter
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Flutter-Debug.xcconfig
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Flutter-Release.xcconfig
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; GeneratedPluginRegistrant.swift
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; ephemeral
&#x2502;   &#x251C;&#x2500;&#x2500; Runner
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; AppDelegate.swift
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Assets.xcassets
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Base.lproj
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Configs
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; DebugProfile.entitlements
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Info.plist
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; MainFlutterWindow.swift
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; Release.entitlements
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcodeproj
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; project.pbxproj
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; project.xcworkspace
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; xcshareddata
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcworkspace
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; contents.xcworkspacedata
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; xcshareddata
&#x2502;   &#x2514;&#x2500;&#x2500; RunnerTests
&#x2502;       &#x2514;&#x2500;&#x2500; RunnerTests.swift
&#x251C;&#x2500;&#x2500; my_app.iml
&#x251C;&#x2500;&#x2500; ohos
&#x2502;   &#x251C;&#x2500;&#x2500; AppScope
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; app.json5
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; resources
&#x2502;   &#x251C;&#x2500;&#x2500; build-profile.json5
&#x2502;   &#x251C;&#x2500;&#x2500; entry
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; build-profile.json5
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; hvigorfile.ts
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; oh-package.json5
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; src
&#x2502;   &#x251C;&#x2500;&#x2500; hvigor
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; hvigor-config.json5
&#x2502;   &#x251C;&#x2500;&#x2500; hvigorfile.ts
&#x2502;   &#x251C;&#x2500;&#x2500; local.properties
&#x2502;   &#x2514;&#x2500;&#x2500; oh-package.json5
&#x251C;&#x2500;&#x2500; pubspec.lock
&#x251C;&#x2500;&#x2500; pubspec.yaml
&#x251C;&#x2500;&#x2500; test
&#x2502;   &#x2514;&#x2500;&#x2500; widget_test.dart
&#x251C;&#x2500;&#x2500; web
&#x2502;   &#x251C;&#x2500;&#x2500; favicon.png
&#x2502;   &#x251C;&#x2500;&#x2500; icons
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Icon-192.png
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Icon-512.png
&#x2502;   &#x2502;   &#x251C;&#x2500;&#x2500; Icon-maskable-192.png
&#x2502;   &#x2502;   &#x2514;&#x2500;&#x2500; Icon-maskable-512.png
&#x2502;   &#x251C;&#x2500;&#x2500; index.html
&#x2502;   &#x2514;&#x2500;&#x2500; manifest.json
&#x2514;&#x2500;&#x2500; windows
    &#x251C;&#x2500;&#x2500; CMakeLists.txt
    &#x251C;&#x2500;&#x2500; flutter
    &#x2502;   &#x251C;&#x2500;&#x2500; CMakeLists.txt
    &#x2502;   &#x251C;&#x2500;&#x2500; generated_plugin_registrant.cc
    &#x2502;   &#x251C;&#x2500;&#x2500; generated_plugin_registrant.h
    &#x2502;   &#x2514;&#x2500;&#x2500; generated_plugins.cmake
    &#x2514;&#x2500;&#x2500; runner
        &#x251C;&#x2500;&#x2500; CMakeLists.txt
        &#x251C;&#x2500;&#x2500; Runner.rc
        &#x251C;&#x2500;&#x2500; flutter_window.cpp
        &#x251C;&#x2500;&#x2500; flutter_window.h
        &#x251C;&#x2500;&#x2500; main.cpp
        &#x251C;&#x2500;&#x2500; resource.h
        &#x251C;&#x2500;&#x2500; resources
        &#x251C;&#x2500;&#x2500; runner.exe.manifest
        &#x251C;&#x2500;&#x2500; utils.cpp
        &#x251C;&#x2500;&#x2500; utils.h
        &#x251C;&#x2500;&#x2500; win32_window.cpp
        &#x2514;&#x2500;&#x2500; win32_window.h

46 directories, 79 files
jianguo@nutpi my_app %
</code></pre><p> <code>ohos</code>&#x76EE;&#x5F55;&#xFF0C;&#x8FD9;&#x91CC;&#x9762;&#x5B58;&#x653E;&#x7684;&#x5C31;&#x662F;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x7684;&#x76F8;&#x5173;&#x4EE3;&#x7801;&#x3002;</p>
<h2 id="&#x7B7E;&#x540D;"><a name="&#x7B7E;&#x540D;" class="plugin-anchor" href="#&#x7B7E;&#x540D;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B7E;&#x540D;</h2>
<p>1.&#x5728;&#x8FD0;&#x884C;&#x9879;&#x76EE;&#x524D;&#xFF0C;&#x5148;&#x5BF9;&#x9879;&#x76EE;&#x8FDB;&#x884C;&#x7B7E;&#x540D;&#xFF0C;&#x5426;&#x5219;&#x5728;&#x8FD0;&#x884C;&#x8FC7;&#x7A0B;&#x4E2D;&#x4F1A;&#x51FA;&#x73B0;&#x8FD9;&#x6837;&#x7684;&#x9519;&#x8BEF;</p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250410094436357.png" alt="image-20250410094436357"></p>
<pre><code class="lang-text">&#x8BF7;&#x901A;&#x8FC7;DevEco Studio&#x6253;&#x5F00;ohos&#x5DE5;&#x7A0B;&#x540E;&#x914D;&#x7F6E;&#x8C03;&#x8BD5;&#x7B7E;&#x540D;(File -&gt; Project Structure -&gt; Signing Configs &#x52FE;&#x9009;Automatically generate signature)
</code></pre>
<p><img src="https://luckly007.oss-cn-beijing.aliyuncs.com/uPic/image-20241105103358856.png" alt="image-20241105103358856"></p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250410093739323.png" alt="image-20250410093739323"></p>
<p>2.&#x7528; DevEco &#x6253;&#x5F00;&#x4E0A;&#x9762;&#x7684; <code>ohos</code> &#x76EE;&#x5F55;&#xFF0C;&#x6CE8;&#x610F;&#x4E0D;&#x662F;&#x9879;&#x76EE;&#x76EE;&#x5F55;&#xFF0C;&#x662F;&#x9879;&#x76EE;&#x4E0B;&#x9762;&#x7684; ohos &#x9E3F;&#x8499;&#x76EE;&#x5F55;&#xFF0C;&#x7136;&#x540E;&#x6839;&#x636E;&#x63D0;&#x793A;&#x4F9D;&#x6B21;&#x6253;&#x5F00; <code>File -&gt; Project Structure -&gt; Signing Configs</code>, &#x70B9;&#x51FB;&#x81EA;&#x52A8;&#x7B7E;&#x540D;&#x5373;&#x53EF;&#x3002;</p>
<p>3.&#x7B7E;&#x540D;&#x6210;&#x529F;&#x540E;&#xFF0C;&#x6587;&#x4EF6; <code>ohos/build-profile.json5</code> &#x4F1A;&#x81EA;&#x52A8;&#x66F4;&#x65B0;&#xFF0C;&#x91CC;&#x9762;&#x7684;&#x5B57;&#x6BB5; <code>signingConfigs</code> &#x51FA;&#x73B0;&#x76F8;&#x5E94;&#x7684;&#x7B7E;&#x540D;&#x914D;&#x7F6E;&#x4FE1;&#x606F;&#x3002;</p>
<h2 id="&#x8FD0;&#x884C;"><a name="&#x8FD0;&#x884C;" class="plugin-anchor" href="#&#x8FD0;&#x884C;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8FD0;&#x884C;</h2>
<p>&#x6211;&#x4EEC;&#x4F7F;&#x7528;flutter run</p>
<pre><code>jianguo@nutpi my_app % hdc tconn 192.168.1.16:41667
Connect OK
jianguo@nutpi my_app % flutter run                 
Connected devices:
127.0.0.1:5555 (mobile)         &#x2022; 127.0.0.1:5555        &#x2022; ohos-arm64     &#x2022; Ohos OpenHarmony-5.0.4.150 (API 16)
192.168.1.16:41667 (mobile)     &#x2022; 192.168.1.16:41667    &#x2022; ohos-arm64     &#x2022; Ohos OpenHarmony-5.0.4.150 (API 16)
macOS (desktop)                 &#x2022; macos                 &#x2022; darwin-arm64   &#x2022; macOS 13.4.1 22F82 darwin-arm64
Mac Designed for iPad (desktop) &#x2022; mac-designed-for-ipad &#x2022; darwin         &#x2022; macOS 13.4.1 22F82 darwin-arm64
Chrome (web)                    &#x2022; chrome                &#x2022; web-javascript &#x2022; Google Chrome 135.0.7049.42

No wireless devices were found.

[1]: 127.0.0.1:5555 (127.0.0.1:5555)
[2]: 192.168.1.16:41667 (192.168.1.16:41667)
[3]: macOS (macos)
[4]: Mac Designed for iPad (mac-designed-for-ipad)
[5]: Chrome (chrome)
Please choose one (or &quot;q&quot; to quit): 2
Launching lib/main.dart on 192.168.1.16:41667 in debug mode...
start hap build...
Running Hvigor task assembleHap...                                 14.1s
&#x2713; Built ohos/entry/build/default/outputs/default/entry-default-signed.hap.
</code></pre><p><img src="https://luckly007.oss-cn-beijing.aliyuncs.com/uPic/image-20241105103741912.png" alt="image-20241105103741912"></p>
<p>&#x7B49;&#x5F85;&#x5C31;&#x53EF;&#x3002;</p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/flutter_01.png" alt="flutter_01"></p>
<p>&#x8FD9;&#x4E0D;&#x662F;&#x51FA;&#x6765;&#x4E86;&#xFF0C;&#x8D5E;&#x8D5E;&#x8D5E;&#x3002;</p>
<pre><code> flutter run --debug -d 9CN0223901000559

  &#x2554;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2557;
  &#x2551;                 Welcome to Flutter! - https://flutter.dev                  &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; The Flutter tool uses Google Analytics to anonymously report feature usage &#x2551;
  &#x2551; statistics and basic crash reports. This data is used to help improve      &#x2551;
  &#x2551; Flutter tools over time.                                                   &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; Flutter tool analytics are not sent on the very first run. To disable      &#x2551;
  &#x2551; reporting, type &apos;flutter config --no-analytics&apos;. To display the current    &#x2551;
  &#x2551; setting, type &apos;flutter config&apos;. If you opt out of analytics, an opt-out    &#x2551;
  &#x2551; event will be sent, and then no further information will be sent by the    &#x2551;
  &#x2551; Flutter tool.                                                              &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; By downloading the Flutter SDK, you agree to the Google Terms of Service.  &#x2551;
  &#x2551; The Google Privacy Policy describes how data is handled in this service.   &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; Moreover, Flutter includes the Dart SDK, which may send usage metrics and  &#x2551;
  &#x2551; crash reports to Google.                                                   &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; Read about data we send with crash reports:                                &#x2551;
  &#x2551; https://flutter.dev/docs/reference/crash-reporting                         &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; See Google&apos;s privacy policy:                                               &#x2551;
  &#x2551; https://policies.google.com/privacy                                        &#x2551;
  &#x2551;                                                                            &#x2551;
  &#x2551; To disable animations in this tool, use                                    &#x2551;
  &#x2551; &apos;flutter config --no-cli-animations&apos;.                                      &#x2551;
  &#x255A;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x2550;&#x255D;


Launching lib/main.dart on 9CN0223901000559 in debug mode...
start hap build...
Running Hvigor task assembleHap...                                 12.8s
&#x2713; Built ohos/entry/build/default/outputs/default/entry-default-signed.hap.
installing hap. bundleName: com.example.my_app
</code></pre><p>&#x5728;&#x6A21;&#x62DF;&#x5668;&#x4E0A;&#x8FD0;&#x884C;&#x95EA;&#x9000;&#xFF0C;&#x4E0D;&#x77E5;&#x9053;&#x5927;&#x5BB6;&#x77E5;&#x9053;&#x4EC0;&#x4E48;&#x539F;&#x56E0;&#x4E0D;&#xFF1F;</p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250410094927223.png" alt="image-20250410094927223"></p>
<h2 id="flutter-doctor--v"><a name="flutter-doctor--v" class="plugin-anchor" href="#flutter-doctor--v"><i class="fa fa-link" aria-hidden="true"></i></a>flutter doctor -v</h2>
<pre><code>jianguo@nutpi ~ % flutter doctor -v
[!] Flutter (Channel [user-branch], 3.22.1-ohos-0.1.1, on macOS 13.4.1 22F82 darwin-arm64, locale zh-Hans-CN)
    ! Flutter version 3.22.1-ohos-0.1.1 on channel [user-branch] at /Users/jianguo/huawei/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn&apos;t fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository git@gitcode.com:openharmony-sig/flutter_flutter.git is not the same as FLUTTER_GIT_URL
    &#x2022; FLUTTER_GIT_URL = https://gitcode.com/openharmony-sig/flutter_flutter.git
    &#x2022; Framework revision ff3e031966 (3 days ago), 2025-04-07 10:25:16 +0800
    &#x2022; Engine revision f6344b75dc
    &#x2022; Dart version 3.4.0
    &#x2022; DevTools version 2.34.1
    &#x2022; Pub download mirror https://pub.flutter-io.cn
    &#x2022; Flutter download mirror https://storage.flutter-io.cn
    &#x2022; If those were intentional, you can disregard the above warnings; however it is recommended to use &quot;git&quot; directly to perform update checks and upgrades.

[&#x2713;] HarmonyOS toolchain - develop for HarmonyOS devices
    &#x2022; OpenHarmony Sdk at /Users/jianguo/Library/OpenHarmony/Sdk, available api versions has [15:15, 14:14, 12:12]
    &#x2022; Ohpm version 5.0.13
    &#x2022; Node version v22.14.0
    &#x2022; Hvigorw binary at /Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw

[&#x2713;] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    &#x2022; Android SDK at /Users/jianguo/Library/Android/sdk
    &#x2022; Platform android-34, build-tools 34.0.0
    &#x2022; ANDROID_HOME = /Users/jianguo/Library/Android/sdk
    &#x2022; Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    &#x2022; Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    &#x2022; All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    &#x2022; Xcode at /Applications/Xcode.app/Contents/Developer
    &#x2022; Build 14E300c
    ! Flutter recommends a minimum Xcode version of 15.
      Download the latest version or update via the Mac App Store.
    &#x2022; CocoaPods version 1.16.2

[&#x2713;] Chrome - develop for the web
    &#x2022; Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[&#x2713;] Android Studio (version 2022.3)
    &#x2022; Android Studio at /Applications/Android Studio.app/Contents
    &#x2022; Flutter plugin can be installed from:
      &#x1F528; https://plugins.jetbrains.com/plugin/9212-flutter
    &#x2022; Dart plugin can be installed from:
      &#x1F528; https://plugins.jetbrains.com/plugin/6351-dart
    &#x2022; Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[&#x2713;] VS Code (version 1.98.2)
    &#x2022; VS Code at /Applications/Visual Studio Code.app/Contents
    &#x2022; Flutter extension version 3.106.0

[&#x2713;] Connected device (5 available)
    &#x2022; 127.0.0.1:5555 (mobile)         &#x2022; 127.0.0.1:5555        &#x2022; ohos-arm64     &#x2022; Ohos OpenHarmony-5.0.4.150 (API 16)
    &#x2022; 192.168.1.16:41667 (mobile)     &#x2022; 192.168.1.16:41667    &#x2022; ohos-arm64     &#x2022; Ohos OpenHarmony-5.0.4.150 (API 16)
    &#x2022; macOS (desktop)                 &#x2022; macos                 &#x2022; darwin-arm64   &#x2022; macOS 13.4.1 22F82 darwin-arm64
    &#x2022; Mac Designed for iPad (desktop) &#x2022; mac-designed-for-ipad &#x2022; darwin         &#x2022; macOS 13.4.1 22F82 darwin-arm64
    &#x2022; Chrome (web)                    &#x2022; chrome                &#x2022; web-javascript &#x2022; Google Chrome 135.0.7049.42

Attempting to reach github.com...&#x28EF;
</code></pre><h2 id="flutter&#x547D;&#x4EE4;"><a name="flutter&#x547D;&#x4EE4;" class="plugin-anchor" href="#flutter&#x547D;&#x4EE4;"><i class="fa fa-link" aria-hidden="true"></i></a>Flutter&#x547D;&#x4EE4;</h2>
<table>
<thead>
<tr>
<th>&#x6307;&#x4EE4;&#x540D;&#x79F0;</th>
<th>&#x6307;&#x4EE4;&#x63CF;&#x8FF0;</th>
<th>&#x4F7F;&#x7528;&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>doctor</td>
<td>&#x73AF;&#x5883;&#x68C0;&#x6D4B;</td>
<td>flutter doctor</td>
</tr>
<tr>
<td>config</td>
<td>&#x73AF;&#x5883;&#x914D;&#x7F6E;</td>
<td>flutter config --<key> <value></value></key></td>
</tr>
<tr>
<td>create</td>
<td>&#x521B;&#x5EFA;&#x65B0;&#x9879;&#x76EE;</td>
<td>flutter create --platforms ohos,android,ios --org <org> <appname></appname></org></td>
</tr>
<tr>
<td>create</td>
<td>&#x521B;&#x5EFA;module&#x6A21;&#x677F;</td>
<td>flutter create -t module <module_name></module_name></td>
</tr>
<tr>
<td>create</td>
<td>&#x521B;&#x5EFA;plugin&#x6A21;&#x677F;</td>
<td>flutter create -t plugin --platforms ohos,android,ios <plugin_name></plugin_name></td>
</tr>
<tr>
<td>create</td>
<td>&#x521B;&#x5EFA;plugin_ffi&#x6A21;&#x677F;</td>
<td>flutter create -t plugin_ffi --platforms ohos,android,ios <plugin_name></plugin_name></td>
</tr>
<tr>
<td>devices</td>
<td>&#x67E5;&#x627E;&#x5DF2;&#x8FDE;&#x63A5;&#x8BBE;&#x5907;</td>
<td>flutter devices</td>
</tr>
<tr>
<td>install</td>
<td>&#x5E94;&#x7528;&#x5B89;&#x88C5;</td>
<td>flutter install -d <deviceid> <hap文件路径></hap文件路径></deviceid></td>
</tr>
<tr>
<td>assemble</td>
<td>&#x8D44;&#x6E90;&#x6253;&#x5305;</td>
<td>flutter assemble</td>
</tr>
<tr>
<td>build</td>
<td>&#x6D4B;&#x8BD5;&#x5E94;&#x7528;&#x6784;&#x5EFA;</td>
<td>flutter build hap --debug [--target-platform ohos-arm64]</td>
</tr>
<tr>
<td>build</td>
<td>&#x6B63;&#x5F0F;&#x5E94;&#x7528;&#x6784;&#x5EFA;</td>
<td>flutter build hap --release [--target-platform ohos-arm64]</td>
</tr>
<tr>
<td>run</td>
<td>&#x5E94;&#x7528;&#x8FD0;&#x884C;</td>
<td>flutter run</td>
</tr>
<tr>
<td>attach</td>
<td>&#x8C03;&#x8BD5;&#x6A21;&#x5F0F;</td>
<td>flutter attach</td>
</tr>
<tr>
<td>screenshot</td>
<td>&#x622A;&#x5C4F;</td>
<td>flutter screenshot</td>
</tr>
<tr>
<td>pub</td>
<td>&#x83B7;&#x53D6;&#x4F9D;&#x8D56;</td>
<td>flutter pub get</td>
</tr>
<tr>
<td>clean</td>
<td>&#x6E05;&#x9664;&#x9879;&#x76EE;&#x4F9D;&#x8D56;</td>
<td>flutter clean</td>
</tr>
<tr>
<td>cache</td>
<td>&#x6E05;&#x9664;&#x5168;&#x5C40;&#x7F13;&#x5B58;&#x6570;&#x636E;</td>
<td>flutter pub cache clean</td>
</tr>
</tbody>
</table>
<h2 id="flutter&#x4E09;&#x65B9;&#x5E93;&#x9002;&#x914D;&#x8FDB;&#x5EA6;"><a name="flutter&#x4E09;&#x65B9;&#x5E93;&#x9002;&#x914D;&#x8FDB;&#x5EA6;" class="plugin-anchor" href="#flutter&#x4E09;&#x65B9;&#x5E93;&#x9002;&#x914D;&#x8FDB;&#x5EA6;"><i class="fa fa-link" aria-hidden="true"></i></a>flutter&#x4E09;&#x65B9;&#x5E93;&#x9002;&#x914D;&#x8FDB;&#x5EA6;</h2>
<p>&#x5177;&#x4F53;&#x53EF;&#x67E5;&#x770B;</p>
<p><a href="https://gitcode.com/openharmony-sig/flutter_packages#openharmony%E5%B9%B3%E5%8F%B0%E5%B7%B2%E5%85%BC%E5%AE%B9%E5%BA%93" target="_blank">https://gitcode.com/openharmony-sig/flutter_packages#openharmony%E5%B9%B3%E5%8F%B0%E5%B7%B2%E5%85%BC%E5%AE%B9%E5%BA%93</a></p>
<h2 id="&#x575A;&#x679C;&#x6D3E;"><a name="&#x575A;&#x679C;&#x6D3E;" class="plugin-anchor" href="#&#x575A;&#x679C;&#x6D3E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x575A;&#x679C;&#x6D3E;</h2>
<p>&#x575A;&#x679C;&#x6D3E;&#x7531;&#x575A;&#x679C;&#x7B49;&#x70ED;&#x8054;&#x5408;&#x521B;&#x5EFA;&#xFF0C;&#x82E5;&#x5E72;&#x5176;&#x4ED6;&#x9886;&#x57DF;&#x7684;&#x4E09;&#x5341;&#x4F59;&#x4F4D;&#x4E07;&#x7C89;&#x535A;&#x4E3B;&#x8FD0;&#x8425;&#x3002;&#x4E13;&#x6CE8;&#x4E8E;&#x5206;&#x4EAB;&#x7684;&#x6280;&#x672F;&#x5305;&#x62EC;HarmonyOS/OpenHarmony&#xFF0C;ArkUI-X&#xFF0C;&#x5143;&#x670D;&#x52A1;&#xFF0C;AI&#xFF0C;&#x4ED3;&#x9889;&#xFF0C;BlueOS&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x3001;&#x56E2;&#x961F;&#x6210;&#x5458;&#x805A;&#x96C6;&#x5728;&#x5317;&#x4EAC;&#x3001;&#x4E0A;&#x6D77;&#x3001;&#x5E7F;&#x5DDE;&#x3001;&#x6DF1;&#x5733;&#x3001;&#x5357;&#x4EAC;&#x3001;&#x676D;&#x5DDE;&#x3001;&#x82CF;&#x5DDE;&#x3001;&#x5B81;&#x590F;&#x7B49;&#x5730;&#x3002; &#x805A;&#x7126;&#x201C;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x5E94;&#x7528;&#x201D;&#x3001;&#x201C;&#x667A;&#x80FD;&#x7269;&#x8054;&#x201D;&#x548C;&#x201C;AI&#x8D4B;&#x80FD;&#x201D;&#x3001;&#x201C;&#x4EBA;&#x5DE5;&#x667A;&#x80FD;&#x201D;&#x56DB;&#x5927;&#x4E1A;&#x52A1;&#x9886;&#x57DF;&#xFF0C;&#x4F9D;&#x6258;&#x534E;&#x4E3A;&#x5F00;&#x53D1;&#x8005;&#x4E13;&#x5BB6;&#x7B49;&#x5F3A;&#x5927;&#x7684;&#x6280;&#x672F;&#x56E2;&#x961F;&#xFF0C;&#x4EE5;&#x53CA;&#x6DB5;&#x76D6;&#x9700;&#x6C42;&#x3001;&#x5F00;&#x53D1;&#x3001;&#x6D4B;&#x8BD5;&#x3001;&#x8FD0;&#x7EF4;&#x4E8E;&#x4E00;&#x4F53;&#x7684;&#x7EFC;&#x5408;&#x670D;&#x52A1;&#x4F53;&#x7CFB;&#xFF0C;&#x8D4B;&#x80FD;&#x6587;&#x65C5;&#x3001;&#x5A92;&#x4F53;&#x3001;&#x793E;&#x4EA4;&#x3001;&#x5BB6;&#x5C45;&#x3001;&#x6D88;&#x8D39;&#x7535;&#x5B50;&#x7B49;&#x884C;&#x4E1A;&#x5BA2;&#x6237;&#xFF0C;&#x6EE1;&#x8DB3;&#x793E;&#x533A;&#x5BA2;&#x6237;&#x6570;&#x5B57;&#x5316;&#x5347;&#x7EA7;&#x8F6C;&#x578B;&#x7684;&#x9700;&#x6C42;&#xFF0C;&#x5E2E;&#x52A9;&#x5BA2;&#x6237;&#x5B9E;&#x73B0;&#x4EF7;&#x503C;&#x63D0;&#x5347;&#x3002; &#x76EE;&#x524D;&#x4E0A;&#x67B6;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x5E94;&#x7528;18&#x6B3E;&#xFF0C;&#x4E09;&#x65B9;&#x5E93;56&#x4E2A;&#x3002;</p>
<h2 id="&#x5730;&#x5740;&#xFF1A;"><a name="&#x5730;&#x5740;&#xFF1A;" class="plugin-anchor" href="#&#x5730;&#x5740;&#xFF1A;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5730;&#x5740;&#xFF1A;</h2>
<p><a href="https://www.nutpi.net/" target="_blank">https://www.nutpi.net/</a></p>
<p><a href="https://atomgit.com/nutpi" target="_blank">https://atomgit.com/nutpi</a></p>
<p><a href="https://gitcode.com/nutpi" target="_blank">https://gitcode.com/nutpi</a></p>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-04-25 08:03:04
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://my.openwrite.cn/js/readmore.js"></script>
                <script>
                    var enablePlugin = false;
                    var allowDomain = "localhost";
                    if(allowDomain){
                        var currentDomain = location.hostname;
                        if ($.isArray(allowDomain)) {
                            $.each(allowDomain, function(index, item) {
                                if (currentDomain == item) {
                                    enablePlugin = true;
                                    return false;
                                }
                            });
                        }else{
                           if (currentDomain == allowDomain) {
                                enablePlugin = true;
                            }
                        }
                    }else{
                        enablePlugin = true;
                    }
                    
                    if(enablePlugin){
                        var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                        if (!isMobile) {
                            var btw = new BTWPlugin();
                            btw.init({"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果","id":"vip-container"});
                        }
                    }
                </script> 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="5.2mac环境配置.html"
      class="
        navigation navigation-prev
        
      "
      aria-label="Previous page: 6.2 mac环境配置"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="5.4第一个鸿蒙Flutter应用程序.html"
      class="
        navigation navigation-next
        
      "
      aria-label="Next page: 6.4第一个鸿蒙Flutter应用程序"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"6.3 使用 FlutterSDK 3.22.1","level":"1.6.3","depth":2,"next":{"title":"6.4第一个鸿蒙Flutter应用程序","level":"1.6.4","depth":2,"path":"chapter5/5.4第一个鸿蒙Flutter应用程序.md","ref":"./chapter5/5.4第一个鸿蒙Flutter应用程序.md","articles":[]},"previous":{"title":"6.2 mac环境配置","level":"1.6.2","depth":2,"path":"chapter5/5.2mac环境配置.md","ref":"./chapter5/5.2mac环境配置.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.gitbook.com/","name":"坚果派官网"},{"target":"_blank","url":"https://www.npmjs.com/package/package","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"元服务开发实践"},{"target":"_blank","url":"https://blog.51cto.com/jianguo","name":"OpenHarmony应用开发"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"Flutter for Harmony教程","language":"zh-hans","gitbook":"*","description":"Flutter for Harmony电子书教程"},"file":{"path":"chapter5/5.6使用最新的fluttersdk配置开发环境.md","mtime":"2025-04-25T00:03:04.904Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-05-22T05:24:30.737Z"},"basePath":"..","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

